from selenium.webdriver.common.by import By

byid = By.ID
byname = By.NAME
bycname = By.CLASS_NAME
bytname = By.TAG_NAME
bylink = By.LINK_TEXT
bycss = By.CSS_SELECTOR
byxpath = By.XPATH
byparriallike = By.PARTIAL_LINK_TEXT

url = "http://10.59.9.14:7003/boss/"


# 搜索用户
class Recnoosearch:
    """首页页面元素定位配置（优化后）"""
    # 用户管理
    recnoo_yggl = byxpath, '//*[@id="sidebar"]/div[2]/div[5]/h2'
    # 用户信息
    recnoo_yyxx = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[6]/ul/li/div/a'
    # 搜索按钮
    recnoo_ssk = byxpath, '//*[@id="navTab"]/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[1]/input'
    # 查询按钮
    recnoo_ssan = byxpath, '//*[@id="navTab"]/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[2]/div/div/button'
    # 断言
    recnoo_dy = byxpath, '//*[@id="navTab"]/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr/td[3]/div'
    recnoo_dy2 = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/ul/li[1]/a/span'

    # 添加用户
    # 添加按钮
    recnoo_tjan = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/ul/li[1]'
    # 用户名称
    recnoo_yhmc = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[1]/dd/input'
    # 手机号
    recnoo_sjh = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[2]/dd/input'
    # 登录密码
    recnoo_dlmm = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[3]/dd/input'
    # 提交按钮
    recnoo_tijan = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[2]/ul/li[1]/div/div/button'
    # 断言
    recnoo_dy3 = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[3]/div'
    #获取用户编号




recnoo = Recnoosearch()
